<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Package_Controller extends CI_Controller {

	function __construct()
	{
		parent::__construct();

		$this->load->model('package_model');
	}

	/**
	* Show packages list
	*/
	public function index()
	{
		$data['package_list'] = $this->package_model->get_all();
		$this->load->view('public/package/index', $data);
	}

	public function detail($id)
	{

		$this->load->model('service_detail_model');

		$data['package_info'] = $this->package_model->get_one_by_id($id);
		$data['service_list'] = $this->service_detail_model->get_by_package_id($id);

		// echo '<pre>' . print_r($data['package_info']->result(), 1) . '</pre>';
		// exit;

		$this->load->view('public/package/detail', $data);
	}
}

/* End of file package_controller.php */
/* Location: ./application/controllers/public/Package_controller.php */
